'''
Created on 2017年10月3日

@author: Administrator
'''

def triangles():
   L=[1]
   while True:
       yield L
       L.append(0)
       L=[L[i-1]+L[i] for i in range(len(L))]

if __name__ == '__main__':
    n=0
    a = input("请输入杨辉三角的行数：")
    for t in triangles():
        print(t)
        n = n+1
        if n == int(a):
            break